A media stream is video, audio, text, game, interactive, and/or other digital media content with a duration that spans an interval of time. Streaming such media content (i.e., a media stream) over the Internet to multiple clients is complex and resource intensive.
A stream provider originates (e.g., creates or generates) the media content for the media stream and uses one or more encoders to encode the media content into segments. Each segment encodes a short duration of the overall media content. The stream provider, via the encoder or other publishing tool, uploads the segments to an ingest device of a delivery platform. The ingest device ingests the segments of a media stream in order to make those segments available for redistribution by streaming devices of the delivery platform. The delivery platform may be operated by the stream provider, a content delivery network (CDN), or other third-party cloud operator with distributed resources for wide-scale distribution of the media stream.
Ingest devices can simultaneously ingest into the delivery platform, multiple streams from one or more stream providers, including multiple different bitrates or quality encodings of the same stream. Resources of the ingest device are mainly allocated for the ingest of media streams into the delivery platform. The streaming devices offload the distribution overhead by providing a fan-out distribution of the media streams from the ingest device to requesting client devices.
The streaming devices may be located in different geographic regions. The streaming devices may have a cache into which they store some segments of a media stream temporarily. Requests for the same segments by different client devices can then be served by a streaming device based on a single retrieval from an ingest device, rather than each client request causing a retrieval to the ingest device.
The ingest devices can, however, become a single point of failure that disrupts the entire delivery of a media stream if that media stream is published to one ingest device. In other words, should the ingest device fail, the streaming devices have no place from which to retrieve and distribute segments for the media streams that were uploaded to that ingest device.
For redundancy reasons, the delivery platform provides two or more ingest devices, in the same or different locations. Stream providers may upload their stream segments to two or more ingest devices of the delivery platform.
Upon receiving some part of a new media stream (e.g., media stream segment, manifest, metadata, or other data), an ingest device may issue a publish event that notifies the streaming devices about the availability of the media stream from that ingest device. Upon receiving requests for the new media stream, the streaming devices can retrieve the requested segments from the one or more ingest devices that issued the publish event for that media stream.
Although redundancy is provided, the problem with this approach is that overhead is placed on the ingest devices to also manage the removal or deletion of the media streams from the delivery platform. Thus, in addition to sending the publish events, the ingest devices also send unpublish events when media streams are no longer available. The unpublish event notifies the streaming devices that a media stream is no longer available and that the streaming devices should not attempt retrieval of that media from the ingest devices issuing the unpublish event.
A failure at an encoder, an ingest device, or the network pathways connecting the encoders, ingest devices, and streaming devices can prevent the unpublish events from reaching the streaming device or prevent the unpublish events from even being generated at the appropriate times. If the ingest of a particular media stream to a first ingest device fails or is temporarily interrupted, the first ingest device sends the unpublish event to the streaming devices that can then failover to a redundant second ingest device to which the particular media stream may also be published (without interruption). However, without the unpublish event, the streaming devices continue to request segments of the particular media stream from the first ingest device. This can lead to several seconds of stream outage and interruption of stream playback on client devices.
A further problem is manifest generation for media streams uploaded to the delivery platform. The manifest instructs client players as to the next segments of a media stream and where those segments are available (e.g., the Uniform Resource Locator for requesting the segments). Additionally, the manifest identifies different bitrates or quality encodings at which the same stream is available for playback. Currently, the ingest devices generate the manifests based on the ingested stream segments. In order to identify the different bitrates for a stream in the manifest, the ingest device generating the manifest has to receive the stream segments at each of the different bitrates. This, however, can lead to disproportionate load distribution across the ingest devices as one ingest device may be tasked with ingesting multiple media streams that each have multiple bitrate encodings, while another ingest device is tasked with ingesting multiple media streams that each have a single bitrate encoding. The disproportionate load distribution can overload the ingest devices and cause them to fail. Also, the generation of the master manifest containing the different bitrates of a media stream is additional overhead that is placed on the ingest devices.